<template>
	<div>
		<div style="margin-bottom: 1.25rem; cursor: pointer;">作业文件夹</div>
	
	<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%;overflow: auto;height: 100vh;"
	 @selection-change="handleSelectionChange" :header-cell-style="{'background-color': '#f2f4f7'}" :cell-style="{padding:'20px 0'}">
		<el-table-column type="selection">
		</el-table-column>
		<el-table-column label="文件夹">
			
			<template slot-scope="scope" style="display: flex;">
			<img src="../../../../../public/images/file.png" style="height:2rem; vertical-align: middle;"/>
			<span >{{ scope.row.examDireName }}</span></template>
		</el-table-column>
		
		<el-table-column prop="teacherName" label="创建者">
		</el-table-column>
		<el-table-column prop="phone" label="手机号">
		</el-table-column>
		<el-table-column  label="操作" show-overflow-tooltip>
			<template slot-scope="scope">
				<!-- {{ scope.row.date }} -->
				<!-- <el-button icon="el-icon-search" circle  style="background-color:#03d3bd;color: white;"></el-button>
				  <el-button icon="el-icon-search" circle style="background-color:#ffab03;color: white;"></el-button>
				   <el-button icon="el-icon-search" circle style="background-color: #ff4949;color: white;"></el-button> -->
			<!-- 	<el-button style="background-color:#03d3bd;color: white;"　size="mini">删除</el-button> -->
				<el-button style="background-color:#ffab03;color: white;"  @click="check(scope.$index,scope.row)" size="mini">查看</el-button>
				<!-- <el-button style="background-color: #ff4949;color: white;"　size="mini" >删除</el-button> -->
				<!-- <el-link type="primary" style="margin-left: 0.875rem;" @click="check(scope.$index,scope.row)">查看</el-link>
				<el-link type="success" style="margin-left: 0.875rem;">删除</el-link> -->
			</template>
		</el-table-column>
	</el-table>
	</div>
</template>

<script>
	import {
		HttpManager
	} from "../../../../request/Teacher.js"
	export default {

		data() {
			return {
				tableData: [],
				multipleSelection: [],
				// 表单数据
				formData: {
					// 上级文件夹id，默认全部文件最上层为0
					id: 0,
					// 搜索框内容
					search: '',
					// 是否逆序
					reverse: false
				},
				newClassMask: false,
				addstudent: false,
				activeName: 'first',
				courseId:window.localStorage.getItem("ClassId"),
			}

		},
		methods: {
			// 获取文件列表
			async getFiles() {
				// 清空被选中文件id列表
				this.checkedList = []
				console.log('获取文件列表')
				// params参数：文件夹id、搜索的值、是否逆序
				// this.files = await axios.get('/files', { params: this.formData })
			},
			handleSelectionChange() {

			},
			handleClose() {
				this.addstudent = false
			},
			handleClick(tab, event) {
				console.log(tab, event);
			},
			check(index,rows)
			{
				this.$emit('child1-event',rows);
			},
			//根据课程id获取课程下教师考试目录
			getExamDireGroupByTeacherByCourseId()
			{
				HttpManager.getExamDireGroupByTeacherByCourseId(this.courseId).then(e=>{
					console.log(e);
					this.tableData=e.data.data;
				})
			}

		},
		created()
		{
			this.getExamDireGroupByTeacherByCourseId();
		}


	}
</script>


<style>
</style>
